tools/xenalyze: Fix build with clang
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Feb 2016 19:06:48 +0000 (19:06 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 19 Feb 2016 17:34:48 +0000 (17:34 +0000)
commit28ab9f3d0e7cbb22f5ce77500af7873f6e2d3c59
treeaf0843d7aab42bf3782b36024c39600504739d68
parentc1d5e4c0c6464c8924f356a7b574ffa984b42223
tools/xenalyze: Fix build with clang

1) EXIT_REASON_EXCEPTION_NMI is 0, and Clang complains:

xenalyze.c:513:33: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
    [EXIT_REASON_EXCEPTION_NMI]="EXCEPTION_NMI",
                                ^~~~~~~~~~~~~~~
xenalyze.c:512:11: note: previous initialization is here
    [0] = "NONE",
          ^~~~~~

2) cr3_time_compare(), eip_compare(), ipi_send() and cr3_compare_start() are
   declared as nested functions, which is a GCCism not supported by Clang.

   As they don't actually make use of the interesting feature offered by
   nested functions (i.e. dynamic scoping), move them to just being normal
   functions.

3) clear_interval_summary(), update_cpi() and clear_interval_cpi() are all
   unused.  The former isn't reference anywhere, so is deleted, while the other
   two are called from currently #if 0'd code.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
tools/xentrace/xenalyze.c